package com.aabte.design.pattern.behavioral.chainnofresponsibility.v1;

public class Test {

    public static void main(String[] args) {

        Approver articleApprover = new ArticleApprover();
        Approver videoApprover = new VideoApprover();

        Course course = new Course();
        course.setName("Java课程");
        course.setArticle("Java手记");
        // course.setVideo("Java视频");

        // 设置责任链
        articleApprover.setNextApprover(videoApprover);

        articleApprover.deploy(course);

        /*
        Java课程含有手记，通过!
        Java课程不含视频，不通过，流程结束.
         */

    }

}
